package tech.senri.iot.socket.model

import io.netty.buffer.Unpooled
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import tech.senri.iot.socket.service.util.getArray
import java.nio.charset.Charset

@ApiModel("主动出货请求")
class DeliverCommodityRequest : RequestMessage()
{
    override fun contentData(): ByteArray
    {
        return Unpooled.buffer().writeBytes(orderNo?.toByteArray(Charset.defaultCharset())).writeShort(aisleNo).getArray()
    }

    /**
     * 序列号
     */
    @ApiModelProperty("序列号")
    var orderNo: String? = null

    /**
     * 货道号
     */
    @ApiModelProperty("货道号")
    var aisleNo: Int = 0
}
